Foxit PDF SDK
FoxitPDFSDKPython2.Renderer类 参考
类 FoxitPDFSDKPython2.Renderer 继承关系图:
FoxitPDFSDKPython2.Base

Public 成员函数

def Renderer (bitmap, is_rgb_order)
 带位图的构造函数。 更多...
 
def Renderer (other)
 带另一个渲染器对象的构造函数。 更多...
 
def Renderer (print_param, dest_file_path)
 用于打印的构造函数,带指定的打印设备设置数据。 更多...
 
def ClearClips ()
 清除通过函数 FoxitPDFSDKPython2.Renderer.SetClipRect 设置的裁剪矩形。 更多...
 
def EnableForPrint (is_render_for_print)
 设置标志来决定是否在打印模式下进行渲染。 更多...
 
def IsEmpty ()
 检查当前对象是否为空。 更多...
 
def RenderAnnot (annot, matrix)
 渲染指定的注释。 更多...
 
def RenderFormControls (page, matrix)
 渲染表单控件。 更多...
 
def RenderGraphicsObject (graphics_object, page, matrix)
 渲染图形对象。 更多...
 
def SetClearType (is_clear_type)
 设置标志来决定是否使用ClearType类似的反锯齿来渲染文本对象。 更多...
 
def SetClipPathFill (clip_path, matrix, fill_mode)
 使用填充区域设置裁剪路径。 更多...
 
def SetClipPathStroke (clip_path, matrix, graph_state)
 使用描边区域设置裁剪路径。 更多...
 
def SetClipRect (clip_rect)
 设置将在后续渲染过程中使用的裁剪矩形。 更多...
 
def SetColorMode (color_mode)
 设置颜色模式。 更多...
 
def SetForceDownSample (is_to_force_down_sample)
 设置标志来决定是否对图像拉伸使用下采样。 更多...
 
def SetForceHalftone (is_to_force_halftone)
 设置标志来决定是否对图像拉伸使用半调。 更多...
 
def SetForegroundColor (foreground_color)
 当颜色模式为 FoxitPDFSDKPython2.Renderer.e_ColorModeForeground 时为文本、路径或两者设置前景颜色。 更多...
 
def SetForegroundColorMode (foreground_color_mode)
 当颜色模式为 FoxitPDFSDKPython2.Renderer.e_ColorModeForeground 时设置渲染前景颜色模式。 更多...
 
def SetJPEGDownSample (is_jepg_down_sample)
 设置标志来决定是否对jpeg图像使用下采样。 更多...
 
def SetJPXDownSample (is_jpx_down_sample)
 设置标志来决定是否对jpx图像使用下采样。 更多...
 
def SetLayerContext (layer_context)
 设置图层上下文到渲染上下文句柄。 更多...
 
def SetMappingModeColors (background_color, foreground_color)
 当颜色模式为 FoxitPDFSDKPython2.Renderer.e_ColorModeMappingGray 或 FoxitPDFSDKPython2.Renderer.e_ColorModeMapping 时设置背景颜色和前景颜色。 更多...
 
def SetOverprint (is_to_enable_overprint)
 设置标志来决定是否启用叠印。 更多...
 
def SetPrintTextAsGraphic (is_to_print_text_graphic)
 设置标志来决定是否将文本打印为路径或位图。 更多...
 
def SetPrintTextAsImage (is_to_print_text_image)
 设置标志来决定是否将文本打印为图像。 更多...
 
def SetRenderAnnotAppearanceType (ap_type)
 设置注释的外观类型用于渲染。 更多...
 
def SetRenderAnnotsForThumbnail (is_render_annots_for_thumbnail)
 设置渲染标志来决定是否在缩略图模式下渲染注释。 更多...
 
def SetRenderContentFlags (render_content_flags)
 设置渲染标志来决定渲染什么内容。 更多...
 
def SetRenderEnhanceThinLines (is_render_enhance_thin_lines)
 设置标志来决定是否增强细线。 更多...
 
def SetRenderFormField (is_render_formfield)
 设置标志来决定是否渲染表单字段(除签名字段外)。 更多...
 
def SetRenderImageAntiAliasing (is_render_image_antialiasing)
 设置标志来决定是否绘制图像反锯齿。 更多...
 
def SetRenderLayer (is_render_one_layer)
 设置标志来决定是否渲染一个图层或所有可用图层。 更多...
 
def SetRenderPathAntiAliasing (is_render_path_antialiasing)
 设置标志来决定是否绘制路径反锯齿。 更多...
 
def SetRenderPathFullCovered (is_render_path_full_covered)
 可应用于填充模式的特殊标志。 更多...
 
def SetRenderPathThinLine (is_render_path_thin_line)
 设置标志来决定是否将路径绘制为细线。 更多...
 
def SetRenderSignature (is_render_signature)
 设置标志来决定是否渲染签名。 更多...
 
def SetRenderSignatureState (is_render_signature_state)
 设置标志来决定是否在签名上绘制签名状态。 更多...
 
def SetRenderTextAntiAliasing (is_render_text_antialiasing)
 设置标志来决定是否绘制文本反锯齿。 更多...
 
def SetScreenDPIScale (scale)
 Set the screen DPI scaling factor for rendering. 更多...
 
def StartQuickRender (page, matrix, pause)
 开始快速渲染PDF页面,主要用于缩略图。 更多...
 
def StartRender (page, matrix, pause)
 开始渲染PDF页面。 更多...
 
def StartRenderBitmap (bitmap, matrix, clip_rect, interpolation, pause)
 开始渲染位图。 更多...
 
def StartRenderReflowPage (reflow_page, matrix, pause)
 开始渲染重排页面。 更多...
 
def StartRenderXFAPage (xfa_page_view, matrix, is_highlight, pause)
 开始渲染XFA页面。 更多...
 

静态 Public 属性

 e_ColorModeAlpha = _fsdk.Renderer_e_ColorModeAlpha
 仅输出alpha,忽略颜色。
 
 e_ColorModeForeground = _fsdk.Renderer_e_ColorModeForeground
 自定义颜色模式。将颜色映射到前景。
 
 e_ColorModeForegroundBlackPath = _fsdk.Renderer_e_ColorModeForegroundBlackPath
 如果设置,仅需要替换路径的黑色。
 
 e_ColorModeForegroundBlackText = _fsdk.Renderer_e_ColorModeForegroundBlackText
 如果设置,仅需要替换文本的黑色。
 
 e_ColorModeForegroundPath = _fsdk.Renderer_e_ColorModeForegroundPath
 如果设置,需要替换路径的颜色。
 
 e_ColorModeForegroundText = _fsdk.Renderer_e_ColorModeForegroundText
 如果设置,需要替换文本的颜色。
 
 e_ColorModeMapping = _fsdk.Renderer_e_ColorModeMapping
 将颜色值映射到由背景颜色和前景颜色定义的颜色范围。
 
 e_ColorModeMappingGray = _fsdk.Renderer_e_ColorModeMappingGray
 将灰阶:白色/黑色颜色值映射到背景/前景;其他颜色不变。
 
 e_ColorModeNormal = _fsdk.Renderer_e_ColorModeNormal
 正常颜色模式。
 
 e_RenderAnnot = _fsdk.Renderer_e_RenderAnnot
 如果设置,将渲染注释。
 
 e_RenderExceptHighlight = _fsdk.Renderer_e_RenderExceptHighlight
 如果设置,将渲染除高亮外的所有注释。
 
 e_RenderHighlight = _fsdk.Renderer_e_RenderHighlight
 如果设置,仅渲染高亮注释。
 
 e_RenderPage = _fsdk.Renderer_e_RenderPage
 如果设置,将渲染页面内容。
 
 e_RenderScreen = _fsdk.Renderer_e_RenderScreen
 如果设置,仅渲染屏幕注释。
 

详细描述

PDF渲染器是一个图形引擎,用于将页面渲染到位图或平台设备上下文。 此类可以用位图或设备对象构造。它提供设置渲染选项/标志和执行渲染的函数。 在此类中,有几种渲染方法:

在Foxit PDF SDK中,窗口部件注释总是与表单字段和表单控件关联。对于如何渲染 窗口部件注释,这里是推荐的流程:

参见
FoxitPDFSDKPython2.Filler

构造及析构函数说明

◆ Renderer() [1/3]

def FoxitPDFSDKPython2.Renderer.Renderer (   bitmap,
  is_rgb_order 
)

带位图的构造函数。

输入位图被视为独立设备,渲染器渲染的所有内容 都将出现在位图中。

参数
[in]bitmap用于渲染的位图。用户应确保位图保持有效,直到 当前渲染器对象的生命周期结束。
[in]is_rgb_ordertrue 表示Foxit PDF SDK在渲染时需要使用RGB字节顺序 (红色在最低位)。
false 表示Foxit PDF SDK在渲染时需要使用BGR字节顺序 (蓝色在最低位)。

◆ Renderer() [2/3]

def FoxitPDFSDKPython2.Renderer.Renderer (   other)

带另一个渲染器对象的构造函数。

参数
[in]other另一个渲染器对象。

◆ Renderer() [3/3]

def FoxitPDFSDKPython2.Renderer.Renderer (   print_param,
  dest_file_path 
)

用于打印的构造函数,带指定的打印设备设置数据。

渲染器渲染的所有内容将出现在PDF文件或PostScript文件中。 生成PS文件仅在Linux系统上支持。

参数
[in]print_param用于打印设备的设置数据。
[in]dest_file_path生成打印的PDF文件或PostScript文件的路径。如果此路径 是PDF文件路径,请确保Foxit PDF SDK已通过函数 FoxitPDFSDKPython2.Library.Initialize 使用包含 "Print2PDF"模块的密钥成功初始化。

成员函数说明

◆ ClearClips()

def FoxitPDFSDKPython2.Renderer.ClearClips ( )

清除通过函数 FoxitPDFSDKPython2.Renderer.SetClipRect 设置的裁剪矩形。

返回
无。

◆ EnableForPrint()

def FoxitPDFSDKPython2.Renderer.EnableForPrint (   is_render_for_print)

设置标志来决定是否在打印模式下进行渲染。

当当前渲染器用于打印时,请确保此渲染标志设置为预期值。 对于渲染注释,如果此标志设置为 true,Foxit PDF SDK将仅渲染 具有注释标志 FoxitPDFSDKPython2.Annot.e_FlagPrint 的注释。
如果对当前渲染器对象尚未调用此函数,将使用默认值 false。

参数
[in]is_render_for_printtrue 表示在打印模式下渲染,而 false 表示不在打印模式下渲染。
返回
无。

◆ IsEmpty()

def FoxitPDFSDKPython2.Renderer.IsEmpty ( )

检查当前对象是否为空。

当当前对象为空时,意味着当前对象无用。

返回
true 表示当前对象为空,而 false 表示非空。

◆ RenderAnnot()

def FoxitPDFSDKPython2.Renderer.RenderAnnot (   annot,
  matrix 
)

渲染指定的注释。

当调用此函数时,渲染标志(通过函数 FoxitPDFSDKPython2.Renderer.SetRenderContentFlags 设置 或默认设置)将被忽略。

参数
[in]annot要渲染的注释对象。如果输入的注释是弹出注释,此函数将 不渲染它并返回 false。
[in]matrix用于渲染的变换矩阵,通常由函数 FoxitPDFSDKPython2.PDFPage.GetDisplayMatrix 返回。
返回
true 表示成功,而 false 表示失败。

◆ RenderFormControls()

def FoxitPDFSDKPython2.Renderer.RenderFormControls (   page,
  matrix 
)

渲染表单控件。

当调用此函数时,渲染标志(通过函数 FoxitPDFSDKPython2.Renderer.SetRenderContentFlags 设置或默认设置)将被忽略。

参数
[in]page有效的PDF页面。如果输入页面无效,此函数什么也不做并直接返回 false。
[in]matrix用于渲染的变换矩阵,通常由函数 FoxitPDFSDKPython2.PDFPage.GetDisplayMatrix 返回。
返回
true 表示成功,而 false 表示失败。

◆ RenderGraphicsObject()

def FoxitPDFSDKPython2.Renderer.RenderGraphicsObject (   graphics_object,
  page,
  matrix 
)

渲染图形对象。

当调用此函数时,渲染标志(通过函数 FoxitPDFSDKPython2.Renderer.SetRenderContentFlags 设置或默认设置)将被忽略。

参数
[in]graphics_object要渲染的有效PDF图形对象。
[in]page有效的PDF页面。参数 graphics_object 属于此PDF页面。
[in]matrix用于渲染的变换矩阵,通常由函数 FoxitPDFSDKPython2.PDFPage.GetDisplayMatrix 返回。
返回
true 表示成功,而 false 表示失败。

◆ SetClearType()

def FoxitPDFSDKPython2.Renderer.SetClearType (   is_clear_type)

设置标志来决定是否使用ClearType类似的反锯齿来渲染文本对象。

如果不调用此函数,将使用默认值 true。

参数
[in]is_clear_typetrue 表示使用ClearType类似的反锯齿来渲染文本对象。 false 表示不使用ClearType类似的反锯齿来渲染文本对象。
返回
无。

◆ SetClipPathFill()

def FoxitPDFSDKPython2.Renderer.SetClipPathFill (   clip_path,
  matrix,
  fill_mode 
)

使用填充区域设置裁剪路径。

参数
[in]clip_path裁剪路径。
[in]matrix用于裁剪的变换矩阵。
[in]fill_mode填充模式。应该是值 或 。
返回
无。

◆ SetClipPathStroke()

def FoxitPDFSDKPython2.Renderer.SetClipPathStroke (   clip_path,
  matrix,
  graph_state 
)

使用描边区域设置裁剪路径。

参数
[in]clip_path裁剪路径。
[in]matrix用于裁剪的变换矩阵。
[in]graph_state有效的图形状态,用于画笔属性。如果为 null,Foxit PDF SDK将 使用默认构造函数的图形状态对象。默认值:null。
返回
无。

◆ SetClipRect()

def FoxitPDFSDKPython2.Renderer.SetClipRect (   clip_rect)

设置将在后续渲染过程中使用的裁剪矩形。

参数
[in]clip_rect裁剪矩形。如果为 null,表示在 后续渲染过程中不使用裁剪矩形。
返回
无。

◆ SetColorMode()

def FoxitPDFSDKPython2.Renderer.SetColorMode (   color_mode)

设置颜色模式。

如果不调用此函数,将使用默认值 FoxitPDFSDKPython2.Renderer.e_ColorModeNormal 。

参数
[in]color_mode颜色模式值。应该是以下值之一:
返回
无。

◆ SetForceDownSample()

def FoxitPDFSDKPython2.Renderer.SetForceDownSample (   is_to_force_down_sample)

设置标志来决定是否对图像拉伸使用下采样。

如果不调用此函数,将使用默认值 false。

参数
[in]is_to_force_down_sampletrue 表示对图像拉伸使用下采样。 false 表示对图像拉伸不使用下采样。
返回
无。

◆ SetForceHalftone()

def FoxitPDFSDKPython2.Renderer.SetForceHalftone (   is_to_force_halftone)

设置标志来决定是否对图像拉伸使用半调。

如果不调用此函数,将使用默认值 false。

参数
[in]is_to_force_halftonetrue 表示对图像拉伸使用半调。 false 表示对图像拉伸不使用半调。
返回
无。

◆ SetForegroundColor()

def FoxitPDFSDKPython2.Renderer.SetForegroundColor (   foreground_color)

当颜色模式为 FoxitPDFSDKPython2.Renderer.e_ColorModeForeground 时为文本、路径或两者设置前景颜色。

文本、路径或两者的前景颜色由函数 FoxitPDFSDKPython2.Renderer.SetForegroundColorMode 设置的前景颜色模式决定。

参数
[in]foreground_color文本、路径或两者的前景颜色。格式:0xAARRGGBB。
返回
无。

◆ SetForegroundColorMode()

def FoxitPDFSDKPython2.Renderer.SetForegroundColorMode (   foreground_color_mode)

当颜色模式为 FoxitPDFSDKPython2.Renderer.e_ColorModeForeground 时设置渲染前景颜色模式。

如果不调用此函数,将使用默认值 ( FoxitPDFSDKPython2.Renderer.e_ColorModeForegroundText | FoxitPDFSDKPython2.Renderer.e_ColorModeForegroundPath | FoxitPDFSDKPython2.Renderer.e_ColorModeForegroundBlackText | FoxitPDFSDKPython2.Renderer.e_ColorModeForegroundBlackPath )。

参数
[in]foreground_color_mode渲染前景颜色模式。请参考从 FoxitPDFSDKPython2.Renderer.e_ColorModeForegroundText 开始的值,应该是这些值中的一个或 这些值的组合。
返回
无。

◆ SetJPEGDownSample()

def FoxitPDFSDKPython2.Renderer.SetJPEGDownSample (   is_jepg_down_sample)

设置标志来决定是否对jpeg图像使用下采样。

是否对jpeg图像使用下采样将影响PDF页面的渲染结果。 当成功调用当前函数时,用户应该在再次渲染PDF页面之前 为PDF页面(已至少渲染一次)调用函数 FoxitPDFSDKPython2.PDFPage.ClearRenderCache 。
如果不调用此函数,将使用默认值 true。

参数
[in]is_jepg_down_sampletrue 表示对jpeg图像使用下采样。 false 表示对jpeg图像不使用下采样。
返回
无。

◆ SetJPXDownSample()

def FoxitPDFSDKPython2.Renderer.SetJPXDownSample (   is_jpx_down_sample)

设置标志来决定是否对jpx图像使用下采样。

是否对jpx图像使用下采样将影响PDF页面的渲染结果。 当成功调用当前函数时,用户应该在再次渲染PDF页面之前 为PDF页面(已至少渲染一次)调用函数 FoxitPDFSDKPython2.PDFPage.ClearRenderCache 。
如果不调用此函数,将使用默认值 true。

参数
[in]is_jpx_down_sampletrue 表示对jpx图像使用下采样。 false 表示对jpx图像不使用下采样。
返回
无。

◆ SetLayerContext()

def FoxitPDFSDKPython2.Renderer.SetLayerContext (   layer_context)

设置图层上下文到渲染上下文句柄。

为了在渲染上下文上渲染PDF页面内容时渲染一个图层, 用户应该调用此函数将图层上下文设置到渲染上下文。

参数
[in]layer_context图层上下文对象。
返回
无。

◆ SetMappingModeColors()

def FoxitPDFSDKPython2.Renderer.SetMappingModeColors (   background_color,
  foreground_color 
)

当颜色模式为 FoxitPDFSDKPython2.Renderer.e_ColorModeMappingGray 或 FoxitPDFSDKPython2.Renderer.e_ColorModeMapping 时设置背景颜色和前景颜色。

参数
[in]background_color背景颜色。格式:0xAARRGGBB。
[in]foreground_color前景颜色。格式:0xAARRGGBB。
返回
无。

◆ SetOverprint()

def FoxitPDFSDKPython2.Renderer.SetOverprint (   is_to_enable_overprint)

设置标志来决定是否启用叠印。

参数
[in]is_to_enable_overprinttrue 表示启用叠印。 false 表示不启用叠印。 默认值: false.
返回
无。

◆ SetPrintTextAsGraphic()

def FoxitPDFSDKPython2.Renderer.SetPrintTextAsGraphic (   is_to_print_text_graphic)

设置标志来决定是否将文本打印为路径或位图。

当此标志为 true 时,Foxit PDF SDK将以不同方式渲染文本: 如果字体大小大于50,将文本打印为路径;否则,将文本打印为位图。
如果不调用此函数,将使用默认值 false。

参数
[in]is_to_print_text_graphictrue 表示将文本打印为路径或位图。 false 表示不将文本打印为路径或位图。
返回
无。

◆ SetPrintTextAsImage()

def FoxitPDFSDKPython2.Renderer.SetPrintTextAsImage (   is_to_print_text_image)

设置标志来决定是否将文本打印为图像。

如果不调用此函数,将使用默认值 false。

参数
[in]is_to_print_text_imagetrue 表示将文本打印为图像。 false 表示不将文本打印为图像。
返回
无。

◆ SetRenderAnnotAppearanceType()

def FoxitPDFSDKPython2.Renderer.SetRenderAnnotAppearanceType (   ap_type)

设置注释的外观类型用于渲染。

参数
[in]ap_type注释外观的类型。请参考从 FoxitPDFSDKPython2.Annot.e_AppearanceTypeNormal 开始的值,应该是这些值中的一个。
返回
无。

◆ SetRenderAnnotsForThumbnail()

def FoxitPDFSDKPython2.Renderer.SetRenderAnnotsForThumbnail (   is_render_annots_for_thumbnail)

设置渲染标志来决定是否在缩略图模式下渲染注释。

在缩略图模式下,注释的"NoZoom"和"NoRotate"标志将被忽略。 此渲染标志仅在使用标志 FoxitPDFSDKPython2.Renderer.e_RenderAnnot 进行渲染或 调用函数 FoxitPDFSDKPython2.Renderer.RenderAnnot 时可用。关于设置标志 FoxitPDFSDKPython2.Renderer.e_RenderAnnot 请参考函数 FoxitPDFSDKPython2.Renderer.SetRenderContentFlags 。
如果不调用此函数,当此渲染标志可用时将使用默认值 false。

参数
[in]is_render_annots_for_thumbnailtrue 表示在缩略图模式下渲染注释。 false 表示不在缩略图模式下渲染注释。
返回
无。

◆ SetRenderContentFlags()

def FoxitPDFSDKPython2.Renderer.SetRenderContentFlags (   render_content_flags)

设置渲染标志来决定渲染什么内容。

如果不调用此函数,将使用默认值 ( FoxitPDFSDKPython2.Renderer.e_RenderPage | FoxitPDFSDKPython2.Renderer.e_RenderAnnot )。

参数
[in]render_content_flags渲染内容标志。请参考从 FoxitPDFSDKPython2.Renderer.e_RenderPage 开始的值,应该是这些值中的一个或组合。 FoxitPDFSDKPython2.Renderer.e_RenderHighlight 不能与 FoxitPDFSDKPython2.Renderer.e_RenderExceptHighlight 组合。
返回
无。

◆ SetRenderEnhanceThinLines()

def FoxitPDFSDKPython2.Renderer.SetRenderEnhanceThinLines (   is_render_enhance_thin_lines)

设置标志来决定是否增强细线。

如果不调用此函数,将使用默认值 false。

参数
[in]is_render_enhance_thin_linestrue 表示用更粗的路径绘制零宽度线条, 使它们比默认的单像素更可见。
false 表示用单像素宽度绘制零宽度线条。
返回
无。

◆ SetRenderFormField()

def FoxitPDFSDKPython2.Renderer.SetRenderFormField (   is_render_formfield)

设置标志来决定是否渲染表单字段(除签名字段外)。

如果不调用此函数,当此标志可用时将使用默认值 true。

参数
[in]is_render_formfieldtrue 表示渲染表单字段(除签名字段外)。 false 表示不渲染表单字段(除签名字段外)。
返回
无。

◆ SetRenderImageAntiAliasing()

def FoxitPDFSDKPython2.Renderer.SetRenderImageAntiAliasing (   is_render_image_antialiasing)

设置标志来决定是否绘制图像反锯齿。

如果不调用此函数,将使用默认值 true。

参数
[in]is_render_image_antialiasingtrue 表示绘制图像反锯齿,效果类似于 枚举类InterpolationFlag中定义的值。 false 表示绘制图像锯齿。
返回
无。

◆ SetRenderLayer()

def FoxitPDFSDKPython2.Renderer.SetRenderLayer (   is_render_one_layer)

设置标志来决定是否渲染一个图层或所有可用图层。

如果不调用此函数,当此标志可用时将使用默认值 true。

参数
[in]is_render_one_layertrue 表示渲染一个图层。 false 表示渲染所有可用图层。
返回
无。

◆ SetRenderPathAntiAliasing()

def FoxitPDFSDKPython2.Renderer.SetRenderPathAntiAliasing (   is_render_path_antialiasing)

设置标志来决定是否绘制路径反锯齿。

如果不调用此函数,将使用默认值 true。

参数
[in]is_render_path_antialiasingtrue 表示绘制路径反锯齿。 false 表示绘制路径锯齿。
返回
无。

◆ SetRenderPathFullCovered()

def FoxitPDFSDKPython2.Renderer.SetRenderPathFullCovered (   is_render_path_full_covered)

可应用于填充模式的特殊标志。

如果不调用此函数,将使用默认值 false。

参数
[in]is_render_path_full_coveredtrue 表示路径部分覆盖的所有像素将被完全绘制,而 false 表示不这样做。
返回
无。

◆ SetRenderPathThinLine()

def FoxitPDFSDKPython2.Renderer.SetRenderPathThinLine (   is_render_path_thin_line)

设置标志来决定是否将路径绘制为细线。

如果不调用此函数,将使用默认值 false。

参数
[in]is_render_path_thin_linetrue 表示将路径绘制为细线。 false 表示不将路径绘制为细线。
返回
无。

◆ SetRenderSignature()

def FoxitPDFSDKPython2.Renderer.SetRenderSignature (   is_render_signature)

设置标志来决定是否渲染签名。

如果不调用此函数,当此标志可用时将使用默认值 true。

参数
[in]is_render_signaturetrue 表示渲染签名。 false 表示不渲染签名。
返回
无。

◆ SetRenderSignatureState()

def FoxitPDFSDKPython2.Renderer.SetRenderSignatureState (   is_render_signature_state)

设置标志来决定是否在签名上绘制签名状态。

如果不调用此函数,将使用默认值 true。

参数
[in]is_render_signature_statetrue 表示在签名上绘制签名状态, 而 false 表示不绘制。

◆ SetRenderTextAntiAliasing()

def FoxitPDFSDKPython2.Renderer.SetRenderTextAntiAliasing (   is_render_text_antialiasing)

设置标志来决定是否绘制文本反锯齿。

如果不调用此函数,将使用默认值 true。

参数
[in]is_render_text_antialiasingtrue 表示绘制文本反锯齿。 false 表示绘制文本锯齿。
返回
无。

◆ SetScreenDPIScale()

def FoxitPDFSDKPython2.Renderer.SetScreenDPIScale (   scale)

Set the screen DPI scaling factor for rendering.

Set the screen DPI scaling scale to adapt to different DPI conditions. This value should typically match the system-reported scaling factor (e.g., 1.25f for 125% scaling in display settings) to ensure proper rendering alignment with the physical display characteristics.

参数
[in]scaleThe scale of curren screen DPI(1.0f = 100% native DPI, 2.0f = 200%, etc.). Must be greater than 0 and should generally correspond to the system's recommended scaling factor. Default value: 1.0f for non-Android platforms; 2.5f for Android platform.
注解
Currently, this screen DPI scaling factor only affects the annotations.
返回
None.

◆ StartQuickRender()

def FoxitPDFSDKPython2.Renderer.StartQuickRender (   page,
  matrix,
  pause 
)

开始快速渲染PDF页面,主要用于缩略图。

此函数主要用于为缩略图渲染页面。 渲染的内容将不完整:即使通过函数 FoxitPDFSDKPython2.Renderer.SetRenderContentFlags 设置了标志 FoxitPDFSDKPython2.Renderer.e_RenderAnnot ,所有注释都将被忽略; 文本内容将变得模糊并被像素点替代。
当页面具有复杂或大量内容时,这种快速渲染可能仍需要很长时间, 因此Foxit PDF SDK使用渐进式过程来完成。

参数
[in]page有效的PDF页面。应该已经被解析。
[in]matrix用于渲染的变换矩阵,通常由函数 FoxitPDFSDKPython2.PDFPage.GetDisplayMatrix 返回。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null。
返回
渐进对象。请通过函数 FoxitPDFSDKPython2.Progressive.GetRateOfProgress 检查当前进度的速率。 如果速率尚未达到100,调用函数 FoxitPDFSDKPython2.Progressive.Continue 继续进度直到进度完成。

◆ StartRender()

def FoxitPDFSDKPython2.Renderer.StartRender (   page,
  matrix,
  pause 
)

开始渲染PDF页面。

渲染具有复杂或大量内容的PDF页面可能需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。
在Foxit PDF SDK中,窗体注释总是与表单字段和表单控件关联。对于如何 渲染窗体注释,推荐流程如下:

参数
[in]page有效的PDF页面。如果只渲染注释(即只通过函数 FoxitPDFSDKPython2.Renderer.SetRenderContentFlags 设置了 FoxitPDFSDKPython2.Renderer.e_RenderAnnot ),则无需解析输入页面; 否则输入页面应该已经被解析。
[in]matrix用于渲染的变换矩阵,通常由函数 FoxitPDFSDKPython2.PDFPage.GetDisplayMatrix 返回。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null。
返回
渐进式对象。请通过函数 FoxitPDFSDKPython2.Progressive.GetRateOfProgress 检查当前进度的比率。如果比率还不是100,调用函数 FoxitPDFSDKPython2.Progressive.Continue 继续进度直到进度完成。

◆ StartRenderBitmap()

def FoxitPDFSDKPython2.Renderer.StartRenderBitmap (   bitmap,
  matrix,
  clip_rect,
  interpolation,
  pause 
)

开始渲染位图。

渲染具有复杂或大量内容的位图可能需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。

参数
[in]bitmap有效的位图。用户应确保位图在 当前渲染过程完成之前保持有效。
[in]matrix用于渲染的变换矩阵。此矩阵用作图像矩阵:
假设 h 是图像高度,w 是图像宽度,那么矩阵 [w 0 0 h 0 0] 将产生一个相同的图像。
[in]clip_rect渲染设备的裁剪矩形。可以为 null。 默认值:null。
[in]interpolation位图插值标志。请参考从 FoxitPDFSDKPython2.Bitmap.e_Downsample 开始的值,可以是这些值中的一个或组合。 如果不指定任何标志,请使用0。默认值:0。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null。
返回
渐进对象。请通过函数 FoxitPDFSDKPython2.Progressive.GetRateOfProgress 检查当前进度的速率。 如果速率尚未达到100,调用函数 FoxitPDFSDKPython2.Progressive.Continue 继续进度直到进度完成。

渲染具有复杂或大量内容的位图可能需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。

参数
[in]bitmap有效的位图。用户应确保位图在 当前渲染过程完成之前保持有效。
[in]matrix用于渲染的变换矩阵。此矩阵用作图像矩阵:
假设 h 是图像高度,w 是图像宽度,那么矩阵 [w 0 0 h 0 0] 将产生一个相同的图像。
[in]clip_rect渲染设备的裁剪矩形。可以为 null。
[in]interpolation位图插值标志。请参考从 FoxitPDFSDKPython2.Bitmap.e_Downsample 开始的值,可以是这些值中的一个或组合。 如果不指定任何标志,请使用0。
[in]alpha位图透明度值(0 = 完全透明,255 = 完全不透明)。 有效范围:从0到255。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。
返回
渐进对象。请通过函数 FoxitPDFSDKPython2.Progressive.GetRateOfProgress 检查当前进度的速率。 如果速率尚未达到100,调用函数 FoxitPDFSDKPython2.Progressive.Continue 继续进度直到进度完成。

◆ StartRenderReflowPage()

def FoxitPDFSDKPython2.Renderer.StartRenderReflowPage (   reflow_page,
  matrix,
  pause 
)

开始渲染重排页面。

渲染具有复杂或大量内容的重排页面可能需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。

参数
[in]reflow_page有效的重排页面。应该已经被解析。
[in]matrix用于渲染的变换矩阵,通常由函数 FoxitPDFSDKPython2.ReflowPage.GetDisplayMatrix 返回。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null。
返回
渐进式对象。请通过函数 FoxitPDFSDKPython2.Progressive.GetRateOfProgress 检查当前进度的比率。如果比率还不是100,调用函数 FoxitPDFSDKPython2.Progressive.Continue 继续进度直到进度完成。

◆ StartRenderXFAPage()

def FoxitPDFSDKPython2.Renderer.StartRenderXFAPage (   xfa_page_view,
  matrix,
  is_highlight,
  pause 
)

开始渲染XFA页面。

渲染具有复杂或大量内容的XFA页面将需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。

参数
[in]xfa_page_view有效的XFA页面。
[in]matrix用于渲染的变换矩阵,通常由函数 FoxitPDFSDKPython2.XFAPage.GetDisplayMatrix 返回。
[in]is_highlighttrue 表示高亮XFA小部件,false 表示不高亮 XFA小部件。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null。
返回
渐进对象。请通过函数 FoxitPDFSDKPython2.Progressive.GetRateOfProgress 检查当前进度的速率。 如果速率尚未达到100,调用函数 FoxitPDFSDKPython2.Progressive.Continue 继续进度直到进度完成。